import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int count=3;
        Scanner scanner=new Scanner(System.in);
        while(count!=0){
            System.out.println("你还有"+count+"次机会");
            System.out.println("请输入密码");
            String pass=scanner.nextLine();
            if (pass.equals("123456")){
                System.out.println("登录成功");
                return;
            }else {
                count--;
            }

        }
    }
}
